@extends('admin.layout')

@section('content_header')
	create company
@stop

@section('content')
	<form method="post" action="{{isset($data)? route('admin.company.update', $data) : route('admin.company.store')}}">
		<div class="form-group">
			<label>会社名</label>
			<input type="text" name="company_name" class="form-control" value="{{$data->company_name??''}}">
		</div>
		<div class="form-group">
			<label>会社ID</label>
			<input type="text" name="company_id" class="form-control" value="{{$data->company_id??''}}">
		</div>
		<div class="form-group">
			<label>ステータス</label>
			<div>
				<div class="form-check form-check-inline">
			  <input class="form-check-input" type="radio" name="status" id="inlineRadio1" value="1" {{!isset($data) || $data->status == 1? 'checked' : ''}}>
			  <label class="form-check-label" for="inlineRadio1">可用</label>
			</div>
			<div class="form-check form-check-inline">
			  <input class="form-check-input" type="radio" name="status" id="inlineRadio2" value="0" {{isset($data) && $data->status == 0 ?'checked' :''}}>
			  <label class="form-check-label" for="inlineRadio2">禁用</label>
			</div>

			</div>

			
		</div>
		@csrf

		@isset($data) @method('PUT') @endisset
		<div class="form-group">
			<button class="btn btn-primary"> submit </button>
		</div>
	</form>
	@component('admin.error') @endcomponent
@stop